package com.sad.we11cis;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class CustomerPage extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_customer_page);
		
		Button reviewRegibtn = (Button)findViewById(R.id.btnReviewRegi);
		reviewRegibtn.setOnClickListener(this);
		Button reviewSearchBtn = (Button)findViewById(R.id.btnReviewSearch);
		reviewSearchBtn.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.customer_page, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
		switch(v.getId()){
		
			case R.id.btnReviewRegi:
				Intent reviewRegi = new Intent(CustomerPage.this, ReviewRegister.class);
				startActivity(reviewRegi);
				break;
			
			case R.id.btnReviewSearch:
				Intent reviewSearch = new Intent(CustomerPage.this, ProductSearch.class);
				startActivity(reviewSearch);
				break;
		}
	}
}
